package ace.oauth2.rpc.api.starter.autoconfig;


import ace.common.rpc.annotations.EnableRpcProvider;
import ace.oauth2.constant.OAuth2Constants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;

/**
 * @author Caspar
 * @contract 279397942@qq.com
 * @create 2020/2/5 1:20
 * @description
 */
@ConditionalOnProperty(
        name = OAuth2Constants.CONFIG_KEY_BASE_API_ENABLE,
        havingValue = "true",
        matchIfMissing = true
)
@EnableFeignClients(basePackages = {OAuth2Constants.FEIGN_CLIENT_SERVICE_PACKAGE})
@EnableRpcProvider(basePackages = {OAuth2Constants.RPC_PROVIDER_PACKAGE})
@Configuration
@Slf4j
public class EnableFeignClientAutoConfigure {

}
